package com.ruoyi.question.domain;

import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 题目管理对象 quiz_question_info
 * 
 * @author amy
 * @date 2025-06-10
 */
@Schema(description = "题目管理对象")
public class QuestionInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 自增ID */
    @Schema(title = "自增ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 逻辑主键-题目编码 */
    @Schema(title = "逻辑主键-题目编码")
    private String questionCode;

    /** 所属圈子 */
    @Schema(title = "所属圈子")
    @Excel(name = "所属圈子")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long circleId;

    /** 所属文章 */
    @Schema(title = "所属文章")
    @Excel(name = "所属文章")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long generatedTextId;

    /** 问题标题 */
    @Schema(title = "问题标题")
    @Excel(name = "问题标题")
    private String questionTitle;

    /** 题目类型 */
    @Schema(title = "题目类型")
    @Excel(name = "题目类型")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long questionType;

    /** 选项 */
    @Schema(title = "选项")
    @Excel(name = "选项")
    private String questionOptions;

    /** 正确答案 */
    @Schema(title = "正确答案")
    @Excel(name = "正确答案")
    private String correctAnswer;

    /** 答案解释 */
    @Schema(title = "答案解释")
    @Excel(name = "答案解释")
    private String answerExplanation;

    /** 答对奖励积分 */
    @Schema(title = "答对奖励积分")
    @Excel(name = "答对奖励积分")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long rewardPoints;

    /** 答题总次数 */
    @Schema(title = "答题总次数")
    @Excel(name = "答题总次数")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long answerCount;

    /** 答对次数 */
    @Schema(title = "答对次数")
    @Excel(name = "答对次数")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long correctCount;

    /** 题目浏览次数 */
    @Schema(title = "题目浏览次数")
    @Excel(name = "题目浏览次数")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long viewCount;

    /** 最后答题时间 */
    @Schema(title = "最后答题时间")
    @Excel(name = "最后答题时间")
    private LocalDate lastAnswerTime;

    /** 题目状态 */
    @Schema(title = "题目状态")
    @Excel(name = "题目状态")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long questionStatus;

    /** 创建人 */
    @Schema(title = "创建人")
    private String createdBy;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDate createdTime;

    /** 更新人 */
    @Schema(title = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @Schema(title = "更新时间")
    private LocalDate updatedTime;

    /** 删除标志 0-未删除 1-已删除 */
    @Schema(title = "删除标志 0-未删除 1-已删除")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deletedFlag;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }


    public void setQuestionCode(String questionCode) 
    {
        this.questionCode = questionCode;
    }

    public String getQuestionCode() 
    {
        return questionCode;
    }


    public void setCircleId(Long circleId) 
    {
        this.circleId = circleId;
    }

    public Long getCircleId() 
    {
        return circleId;
    }


    public void setGeneratedTextId(Long generatedTextId)
    {
        this.generatedTextId = generatedTextId;
    }

    public Long getGeneratedTextId()
    {
        return generatedTextId;
    }


    public void setQuestionTitle(String questionTitle) 
    {
        this.questionTitle = questionTitle;
    }

    public String getQuestionTitle() 
    {
        return questionTitle;
    }


    public void setQuestionType(Long questionType) 
    {
        this.questionType = questionType;
    }

    public Long getQuestionType() 
    {
        return questionType;
    }


    public void setQuestionOptions(String questionOptions) 
    {
        this.questionOptions = questionOptions;
    }

    public String getQuestionOptions() 
    {
        return questionOptions;
    }


    public void setCorrectAnswer(String correctAnswer) 
    {
        this.correctAnswer = correctAnswer;
    }

    public String getCorrectAnswer() 
    {
        return correctAnswer;
    }


    public void setAnswerExplanation(String answerExplanation) 
    {
        this.answerExplanation = answerExplanation;
    }

    public String getAnswerExplanation() 
    {
        return answerExplanation;
    }


    public void setRewardPoints(Long rewardPoints) 
    {
        this.rewardPoints = rewardPoints;
    }

    public Long getRewardPoints() 
    {
        return rewardPoints;
    }


    public void setAnswerCount(Long answerCount) 
    {
        this.answerCount = answerCount;
    }

    public Long getAnswerCount() 
    {
        return answerCount;
    }


    public void setCorrectCount(Long correctCount) 
    {
        this.correctCount = correctCount;
    }

    public Long getCorrectCount() 
    {
        return correctCount;
    }


    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }


    public void setLastAnswerTime(LocalDate lastAnswerTime) 
    {
        this.lastAnswerTime = lastAnswerTime;
    }

    public LocalDate getLastAnswerTime() 
    {
        return lastAnswerTime;
    }


    public void setQuestionStatus(Long questionStatus) 
    {
        this.questionStatus = questionStatus;
    }

    public Long getQuestionStatus() 
    {
        return questionStatus;
    }


    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }


    public void setCreatedTime(LocalDate createdTime) 
    {
        this.createdTime = createdTime;
    }

    public LocalDate getCreatedTime() 
    {
        return createdTime;
    }


    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }


    public void setUpdatedTime(LocalDate updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public LocalDate getUpdatedTime() 
    {
        return updatedTime;
    }


    public void setDeletedFlag(Long deletedFlag) 
    {
        this.deletedFlag = deletedFlag;
    }

    public Long getDeletedFlag() 
    {
        return deletedFlag;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionCode", getQuestionCode())
            .append("circleId", getCircleId())
            .append("generatedTextId", getGeneratedTextId())
            .append("questionTitle", getQuestionTitle())
            .append("questionType", getQuestionType())
            .append("questionOptions", getQuestionOptions())
            .append("correctAnswer", getCorrectAnswer())
            .append("answerExplanation", getAnswerExplanation())
            .append("rewardPoints", getRewardPoints())
            .append("answerCount", getAnswerCount())
            .append("correctCount", getCorrectCount())
            .append("viewCount", getViewCount())
            .append("lastAnswerTime", getLastAnswerTime())
            .append("questionStatus", getQuestionStatus())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deletedFlag", getDeletedFlag())
            .toString();
    }
}
